<?php

function _routes($routes){


//    主体功能
    $routes->get('/', 'LoginController::login' );
    $routes->get('/login', 'LoginController::login');
    $routes->post('/doLogin', 'LoginController::doLogin',['as'=>'doLogin']);
    $routes->get('/logout', 'LoginController::logout',['filter'=>'isLogin']);
    $routes->get('/register', 'LoginController::register');
    $routes->post('/doRegister', 'LoginController::doRegister',['as'=>'doRegister']);
    $routes->get('/index', 'LoginController::index',['filter'=>'isLogin']);
    $routes->get('/welcome', 'LoginController::welcome',['filter'=>'isLogin']);

//    个人信息
    $routes->group('user',function($routes){
        $routes->get('userinfo', 'UserController::userinfo',['filter'=>'isLogin']);
        $routes->post('doUpdateInfo', 'UserController::doUpdateInfo',['filter'=>'isLogin']);
        $routes->post('doUpdatePwd', 'UserController::doUpdatePwd',['filter'=>'isLogin']);
    });
}